﻿Public Class RtpoInmueble

    Public Shared Function SeleccionarTodo(ByVal descEmpresa As String, ByVal DisplaySelect As Boolean) As List(Of EtpoInmueble)
        Dim tpoInmuebles As List(Of EtpoInmueble) = Nothing

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                tpoInmuebles = DtpoInmueble.SeleccionarTodo(descEmpresa)
                If tpoInmuebles Is Nothing Then tpoInmuebles = New List(Of EtpoInmueble)
                If DisplaySelect Then tpoInmuebles.Insert(0, New EtpoInmueble("00", "-- SELECCIONAR --"))
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return tpoInmuebles
    End Function

End Class
